provider Releases GET /api/0/organizations/{organization_id_or_slug}/sessions/
@utdk/sentry /api/0/organizations/{organization_id_or_slug}/sessions/
Retrieve Release Health Session Statistics
Returns a time series of release health session statistics for projects bound to an organization. The interval and date range are subject to certain restrictions and rounding rules. The date range is rounded to align with the interval, and is rounded to at least one hour. The interval can at most be one day and at least one hour currently. It has to cleanly divide one day, for rounding reasons. Because of technical limitations, this endpoint returns at most 10000 data points. For example, if you select a 90 day window grouped by releases, you will see at most `floor(10k / (90 + 1)) = 109` releases. To get more results, reduce the `statsPeriod`.
organization_id_or_slug path required
The ID or slug of the organization the resource belongs to.
string
field query required
The list of fields to query. The available fields are - `sum(session)` - `count_unique(user)` - `avg`, `p50`, `p75`, `p90`, `p95`, `p99`, `max` applied to `session.duration`. For example, `p99(session.duration)`. Session duration is [no longer being recorded](https://github.com/getsentry/sentry/discussions/42716) as of on Jan 12, 2023. Returned data may be incomplete. - `crash_rate`, `crash_free_rate` applied to `user` or `session`. For example, `crash_free_rate(user)`
array
start query
The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.
string
end query
The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.
string
environment query
The name of environments to filter by.
array
statsPeriod query
The period of time for the query, will override the start & end parameters, a number followed by one of: - `d` for days - `h` for hours - `m` for minutes - `s` for seconds - `w` for weeks For example, `24h`, to mean query data starting from 24 hours ago to now.
string
project query
The IDs of projects to filter by. `-1` means all available projects. For example, the following are valid parameters: - `/?project=1234&project=56789` - `/?project=-1`
array
per_page query
The number of groups to return per request.
integer
interval query
Resolution of the time series, given in the same format as `statsPeriod`. The default and the minimum interval is `1h`.
string
groupBy query
The list of properties to group by. The available groupBy conditions are `project`, `release`, `environment` and `session.status`.
array
orderBy query
An optional field to order by, which must be one of the fields provided in `field`. Use `-` for descending order, for example, `-sum(session)`
string
includeTotals query
Specify `0` to exclude totals from the response. The default is `1`
integer
includeSeries query
Specify `0` to exclude series from the response. The default is `1`
integer
query query
Filters results by using [query syntax](/product/sentry-basics/search/). Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)`
string

Try it

Authentication
Configure credentials for API Reference
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

retrieveReleaseHealthSessionStatistics
GET/api/0/organizations/{organization_id_or_slug}/sessions/
Returns a time series of release health session statistics for projects bound to an organization. The interval and date range are subject to certain restrictions and rounding rules. The date range is rounded to align with the interval, and is rounded to at least one hour. The interval can at most be one day and at least one hour currently. It has to cleanly divide one day, for rounding reasons. Because of technical limitations, this endpoint returns at most 10000 data points. For example, if you select a 90 day window grouped by releases, you will see at most `floor(10k / (90 + 1)) = 109` releases. To get more results, reduce the `statsPeriod`.

Parameters

required

The ID or slug of the organization the resource belongs to.

required

The list of fields to query. The available fields are - `sum(session)` - `count_unique(user)` - `avg`, `p50`, `p75`, `p90`, `p95`, `p99`, `max` applied to `session.duration`. For example, `p99(session.duration)`. Session duration is [no longer being recorded](https://github.com/getsentry/sentry/discussions/42716) as of on Jan 12, 2023. Returned data may be incomplete. - `crash_rate`, `crash_free_rate` applied to `user` or `session`. For example, `crash_free_rate(user)`

The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`.

The name of environments to filter by.

The period of time for the query, will override the start & end parameters, a number followed by one of: - `d` for days - `h` for hours - `m` for minutes - `s` for seconds - `w` for weeks For example, `24h`, to mean query data starting from 24 hours ago to now.

The IDs of projects to filter by. `-1` means all available projects. For example, the following are valid parameters: - `/?project=1234&project=56789` - `/?project=-1`

The number of groups to return per request.

Resolution of the time series, given in the same format as `statsPeriod`. The default and the minimum interval is `1h`.

The list of properties to group by. The available groupBy conditions are `project`, `release`, `environment` and `session.status`.

An optional field to order by, which must be one of the fields provided in `field`. Use `-` for descending order, for example, `-sum(session)`

Specify `0` to exclude totals from the response. The default is `1`

Specify `0` to exclude series from the response. The default is `1`

Filters results by using [query syntax](/product/sentry-basics/search/). Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)`

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sentry from '@utdk/sentry';

await sentry.retrieveReleaseHealthSessionStatistics()